#pragma once


// CToggleButton

class CToggleButton : public CButton
{
        DECLARE_DYNAMIC(CToggleButton)

    public:
        CToggleButton();
        virtual ~CToggleButton();

    protected:
        DECLARE_MESSAGE_MAP()
    public:
        virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
    protected:
        virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

        void DrawButtonText(CDC *dc, CRect r, const char *Buf, COLORREF text_colour);
    public:
        afx_msg void OnBnClicked();

        void SetMessageTarget(CWnd* target)  {mw_addition_message_target =target;};
        afx_msg void OnMouseMove(UINT nFlags, CPoint point);

        bool IsPushed() { return mb_pushed;};
        void SetPushed(bool val);
        void SetHighlit(bool val);
        bool IsHighLit() {return mb_highlit;}

    private:
        bool mb_pushed;
        bool mb_highlit;

        CWnd* mw_addition_message_target;


};


